<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>快速转账</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
</head>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="/admin/welcomepage">首页</a>
       <a href="javascript:window.location.reload();">
          <cite>快速转账</cite>
        </a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <blockquote class="layui-elem-quote">
        提示:此处可对指定用户转账(仅限使用官方接口时有效),转账无法撤回,请谨慎操作!
    </blockquote>
    <fieldset class="layui-elem-field layui-col-md11 " style="margin-top: 10px;">
        <legend>支付宝转账到用户余额</legend>
        <div style="height: 20px;"></div>
        <form class="layui-form layui-col-md-offset1" id="gtjigjfirubrerer" onsubmit="return false;">
            <input type="hidden" name="type" value="2">
            <div class="layui-form-item ">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款用户:</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="name" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款账号:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="pid" autocomplete="off" class="layui-input ">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款金额:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="price" value="" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款备注:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" value="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-col-md-offset4" onclick="alipay_cefewd()">确认打款</button>
                </div>
            </div>
        </form>
    </fieldset>
    <fieldset class="layui-elem-field layui-col-md11 " style="margin-top: 10px;">
        <legend>微信转账到用户零钱</legend>
        <div style="height: 20px;"></div>
        <form class="layui-form layui-col-md-offset1" id="trewrvef" onsubmit="return false;">
            <input type="hidden" name="type" value="1">
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款用户:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" value="" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款账号:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="pid" value="" id="openid" autocomplete="off" class="layui-input ">
                        <a href="javascript:void(0);" style="color: green;" class="layui-form-label"
                           onclick="change_remoney()">扫码获取</a>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款金额:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="price" value="" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">收款备注:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" value="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-col-md-offset4" onclick="wxpay_cefewd()">确认打款</button>
                </div>
            </div>
        </form>
    </fieldset>
    <fieldset class="layui-elem-field layui-col-md11 " style="margin-top: 10px;">
        <legend>微信转账到银行卡</legend>
        <div style="height: 20px;"></div>
        <form class="layui-form layui-col-md-offset1" id="gtjigjfirubrere111r" onsubmit="return false;">
            <input type="hidden" name="type" value="3">
            <div class="layui-form-item ">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">银行卡号:</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="pid" autocomplete="off" value="6212260200127786081" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">用户名:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" autocomplete="off" value="贾德华" class="layui-input ">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">金额:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="price" value="0.1" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">开户行:</label>
                    <div class="layui-input-inline">
                        <select name="bank_code" >
                            <option value="1002">工商银行</option>
                            <option value="1005">农业银行</option>
                            <option value="1026">中国银行</option>
                            <option value="1003">建设银行</option>
                            <option value="1001">招商银行</option>
                            <option value="1066">邮储银行</option>
                            <option value="1020">交通银行</option>
                            <option value="1004">浦发银行</option>
                            <option value="1006">民生银行</option>
                            <option value="1009">兴业银行</option>
                            <option value="1010">平安银行</option>
                            <option value="1021">中信银行</option>
                            <option value="1025">华夏银行</option>
                            <option value="1027">广发银行</option>
                            <option value="1022">光大银行</option>
                            <option value="1032">北京银行</option>
                            <option value="1056">宁波银行</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-form-item ">
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">转账说明:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" autocomplete="off"  value="平台转账" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <div class="layui-input-inline" style="text-align: center;">
                        <button class="layui-btn layui-col-md-offset4" onclick="to_card_pay()">提交申请</button>
                    </div>
                </div>
            </div>
        </form>
    </fieldset>
    <fieldset class="layui-elem-field layui-col-md11 layui-field-title" style="margin-top: 10px;">
        <legend>转账记录</legend>
        <div style="height: 20px;"></div>
        <div class="layui-row">
            <form class="layui-form layui-col-md12 x-so" action="/admin/ta/info" id="ajaxForm">
                <div class="layui-input-inline">
                    <select name="type">
                        <option value=""
                        <%if(type! == null){%>selected<%}%> >转账方式</option>
                        <option value="1"
                        <%if(type! ==1){%>selected<%}%> >微信</option>
                        <option value="2"
                        <%if(type! ==2){%>selected<%}%> >支付宝</option>
                        <option value="3"
                        <%if(type! ==3){%>selected<%}%> >银行卡</option>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="status">
                        <option value=""
                        <%if(status! == null){%>selected<%}%> >状态</option>
                        <option value="2"
                        <%if(status! ==2){%>selected<%}%> >成功</option>
                        <option value="1"
                        <%if(status! ==1){%>selected<%}%> >失败</option>
                    </select>
                </div>
                <input type="text" name="name" placeholder="收款人姓名" autocomplete="off" value="${name!}"
                       class="layui-input">
                <input type="text" name="sid" placeholder="转账ID" autocomplete="off" value="${sid!}" class="layui-input">
                <button class="layui-btn" type="submit"><i class="layui-icon">&#xe615;</i></button>
                <span class="x-right" style="line-height:40px">共：${bean.totalNum!0} 条</span>
            </form>
        </div>
        <div id="dewdewfef">
            <%#ajax pagenode:{%>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>收款ID</th>
                    <th>收款人账号</th>
                    <th>收款人姓名</th>
                    <th>金额</th>
                    <th>状态</th>
                    <th>方式</th>
                    <th>时间</th>
                    <th>操作</th>
                </thead>
                <tbody>
                <%for(o in bean.items!){%>
                <tr>
                    <td>${o.psd!}</td>
                    <td>${myutils.sub_str(o.putId!,0,11)}</td>
                    <td>${o.putName!}</td>
                    <td>${o.price!}</td>
                    <td><%if(o.status! == 2){%>成功<%}else{%>失败<%}%></td>
                    <td><%if(o.pType! ==1){%>微信<%}else if(o.pType! ==2){%>支付宝<%}else if(o.pType! ==3){%>银行卡<%}else{%>QQ<%}%></td>
                    <td>${o.optTime!,dateFormat='yyyy-MM-dd HH:mm:ss'}</td>
                    <td class="td-manage">
                        <a title="查看" onclick="x_admin_show('查看','/admin/ta/view?id=${o.id!}')"
                           href="javascript:void(0);">
                            <i class="layui-icon">&#xe63c;</i>
                        </a>
                        <a title="删除" onclick="member_del(this,'${o.id!}')" href="javascript:void(0);">
                            <i class="layui-icon">&#xe640;</i>
                        </a>
                    </td>
                </tr>
                <%}%>
                </tbody>
            </table>
            <div class="page">
                <%include("/include/page.html",{context:'dewdewfef',action:'/admin/ta/info',model:bean!}){}%>
            </div>
            <script>
                $(function () {
                    layui.use('laydate', function () {
                        var laydate = layui.laydate;
                        //执行一个laydate实例
                        laydate.render({
                            elem: '#start' //指定元素
                        });
                        //执行一个laydate实例
                        laydate.render({
                            elem: '#end' //指定元素
                        });
                    });
                });

                function member_del(obj, id) {
                    layer.confirm('确认要删除吗？', function (index) {
                        $.post("/admin/ta/delete",
                            {"id": id},
                            function (data) {
                                layer.msg(data.msg, {icon: 1, time: 800});
                                $(obj).parents("tr").remove();
                                window.location.reload();
                            }, "json");
                    });
                }

                function alipay_cefewd() {
                    var data = $("#gtjigjfirubrerer").serialize();
                    $.post("/admin/ta/tr",
                        data,
                        function (data) {
                            layer.alert(data.msg, {icon: 6}, function () {
                                window.location.reload();
                            });
                        }, "json");
                }

                function to_card_pay() {
                    var data = $("#gtjigjfirubrere111r").serialize();
                    $.post("/admin/ta/tr",
                        data,
                        function (data) {
                            layer.alert(data.msg, {icon: 6}, function () {
                                window.location.reload();
                            });
                        }, "json");
                }
                function wxpay_cefewd() {
                    var data = $("#trewrvef").serialize();
                    $.post("/admin/ta/tr",
                        data,
                        function (data) {
                            layer.alert(data.msg, {icon: 6}, function () {
                                window.location.reload();
                            });
                        }, "json");
                }

                function change_remoney() {
                    var width = Math.round((window.screen.width - 350) / 2);
                    var height = Math.round((window.screen.height - 350) / 2);
                    window.open('/admin/ta/scancode/wx?id=' + 1 + '&times=' + new Date().getTime(),
                        '扫码绑定微信收款用户',
                        'height=450, width=350, top=' + height + ',left=' + width + ',toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
                }


            </script>
            <%}%>
        </div>
    </fieldset>
</div>
</body>
</html>